﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:42:50
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.Sys
{
	/// <summary>
	/// 地址
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("地址")]
	[BindTable("IP", Description = "地址", ConnName = "Sys", DbType = DatabaseType.SqlServer)]
	public partial class IP
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _IP1;
		/// <summary>
		/// 地址1
		/// </summary>
		[Description("地址1")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "IP1", "地址1", "", "int", 10, 0, false)]
		public Int32 IP1
		{
			get { return _IP1; }
			set { if (OnPropertyChange("IP1", value)) _IP1 = value; }
		}

		private Int32 _IP2;
		/// <summary>
		/// 地址2
		/// </summary>
		[Description("地址2")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "IP2", "地址2", "", "int", 10, 0, false)]
		public Int32 IP2
		{
			get { return _IP2; }
			set { if (OnPropertyChange("IP2", value)) _IP2 = value; }
		}

		private String _IP3;
		/// <summary>
		/// 地址3
		/// </summary>
		[Description("地址3")]
		[DataObjectField(false, false, false, 30)]
		[BindColumn(4, "IP3", "地址3", "", "nvarchar(30)", 0, 0, true)]
		public String IP3
		{
			get { return _IP3; }
			set { if (OnPropertyChange("IP3", value)) _IP3 = value; }
		}

		private String _IP4;
		/// <summary>
		/// 地址4
		/// </summary>
		[Description("地址4")]
		[DataObjectField(false, false, true, 30)]
		[BindColumn(5, "IP4", "地址4", "", "nvarchar(30)", 0, 0, true)]
		public String IP4
		{
			get { return _IP4; }
			set { if (OnPropertyChange("IP4", value)) _IP4 = value; }
		}

		private String _Address;
		/// <summary>
		/// 地址
		/// </summary>
		[Description("地址")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(6, "Address", "地址", "", "nvarchar(200)", 0, 0, true)]
		public String Address
		{
			get { return _Address; }
			set { if (OnPropertyChange("Address", value)) _Address = value; }
		}

		private String _Memo;
		/// <summary>
		/// 注释
		/// </summary>
		[Description("注释")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(7, "Memo", "注释", "", "nvarchar(200)", 0, 0, true)]
		public String Memo
		{
			get { return _Memo; }
			set { if (OnPropertyChange("Memo", value)) _Memo = value; }
		}

		private String _DistrictCode;
		/// <summary>
		/// 区域代码
		/// </summary>
		[Description("区域代码")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(8, "DistrictCode", "区域代码", "", "nvarchar(10)", 0, 0, true)]
		public String DistrictCode
		{
			get { return _DistrictCode; }
			set { if (OnPropertyChange("DistrictCode", value)) _DistrictCode = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(9, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(10, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(11, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(12, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "IP1" : return _IP1;
					case "IP2" : return _IP2;
					case "IP3" : return _IP3;
					case "IP4" : return _IP4;
					case "Address" : return _Address;
					case "Memo" : return _Memo;
					case "DistrictCode" : return _DistrictCode;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "IP1" : _IP1 = Convert.ToInt32(value); break;
					case "IP2" : _IP2 = Convert.ToInt32(value); break;
					case "IP3" : _IP3 = Convert.ToString(value); break;
					case "IP4" : _IP4 = Convert.ToString(value); break;
					case "Address" : _Address = Convert.ToString(value); break;
					case "Memo" : _Memo = Convert.ToString(value); break;
					case "DistrictCode" : _DistrictCode = Convert.ToString(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得地址字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 地址1
			///</summary>
			public const String IP1 = "IP1";

			///<summary>
			/// 地址2
			///</summary>
			public const String IP2 = "IP2";

			///<summary>
			/// 地址3
			///</summary>
			public const String IP3 = "IP3";

			///<summary>
			/// 地址4
			///</summary>
			public const String IP4 = "IP4";

			///<summary>
			/// 地址
			///</summary>
			public const String Address = "Address";

			///<summary>
			/// 注释
			///</summary>
			public const String Memo = "Memo";

			///<summary>
			/// 区域代码
			///</summary>
			public const String DistrictCode = "DistrictCode";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}